function updateText() {
    var myChart = document.getElementById('echart01');
    const chartInstance = myChart.getChartInstance();
    const data_url="/static/zonghezhanshi/demo.json";
    fetch(data_url).then(response => {
        if (!response.ok) {
            throw new Error('Network response was not ok ' + response.statusText);
        }
        return response.json();
    }).then(data => {
        // 更新图表的数据
        if (data){
            chartInstance.setOption({
                xAxis: {
                    data:data.data
                },
                series: [{
                    data:data.ydata
                }]
            });
        }
    }).catch(error => {
        console.error('There has been a problem with your fetch operation:', error);
    });
}



